<template>
  <ul class="app-tools">
    <li @click="onCloseApp">
      <img :src="closeIcon" alt="" />
    </li>
    <li @click="playSound = !playSound">
      <img :src="soundIcon" alt="" />
      <div v-if="!playSound">/</div>
    </li>
    <li>
      <img :src="toolsIcon" alt="" />
    </li>
    <li>
      <img :src="logIcon" alt="" />
    </li>
  </ul>
</template>

<script setup lang="ts">
import closeIcon from '@renderer/assets/img/tools/close.png'
import toolsIcon from '@renderer/assets/img/tools/tools.png'
import logIcon from '@renderer/assets/img/tools/log.png'
import soundIcon from '@renderer/assets/img/tools/sound.png'
const playSound = ref(true)
function onCloseApp() {
  window.electronAPI.closeApp()
}
</script>

<style lang="scss" scoped>
.app-tools {
  position: fixed;
  right: 20px;
  top: 20px;
  display: flex;
  flex-direction: row-reverse;
  li {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-bottom: 18px;
    margin-left: 18px;
    height: 30px;
    width: 30px;
    position: relative;
    div {
      position: absolute;
      font-weight: bolder;
      font-size: 18px;
      top: -2px;
      color: white;
    }
    img {
      height: 25px;
      transition: all 0.5s ease-in-out;
    }
    img:hover {
      height: 28px;
      transition: all 0.5s ease-in-out;
      opacity: 0.8;
    }
    span {
      font-size: 12px;
    }
  }
}
</style>
